-
Notifications
You must be signed in to change notification settings - Fork 739
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Advanced Throwing #3477
Add Advanced Throwing #3477
Conversation
if (_enable) then { | ||
GVAR(KeyDownHandle) = (findDisplay 46) displayAddEventHandler ["KeyDown", {_this call FUNC(onKeyDown)}]; | ||
GVAR(MouseButtonDownHandle) = (findDisplay 46) displayAddEventHandler ["MouseButtonDown", {_this call FUNC(onMouseButtonDown)}]; | ||
GVAR(MouseScrollHandle) = (findDisplay 46) displayAddEventHandler ["MouseZChanged", {_this call FUNC(onMouseScroll)}]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move these to a DisplayLoad event instead. Fixes your point 1.
class Extended_DisplayLoad_EventHandlers {
class RscDisplayMission {
ADDON = QUOTE(_this call COMPILE_FILE(XEH_missionDisplayLoad));
};
};
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keep in mind that findDisplay 46 cannot be used at that point though. use:
params ["_display"]
instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will wait on fixing that when key events are fixed when used with this on CBA's side.
Also mass replace all |
GVAR(ActiveGrenadeType) = ""; | ||
|
||
GVAR(CameraOffset) = [0, 0, 0.3]; | ||
GVAR(zAdjust) = -0.03; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make this three a vector: GVAR(adjust) = [-0.03, -0.05, -0.12];
if (vehicle _unit == _unit) exitWith {true}; | ||
|
||
private _return = false; | ||
private _assignedRole = assignedVehicleRole _unit; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
todo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done locally, just need to push.
Does no funky stuff to weapon ammo anymore as it uses the action directly. Changed controls slightly, mouse wheel up and down is change mod now, 2 right clicks is drop when cooked. Dependent on 3rd person also enabled, but grenade is currently in front of the camera. Some general cleanup as well, it's a start. |
3rd person support added, leaning calculated from head position to make it work when lean is toggled and also adjust for side stances. Someone with more math knowledge than me should probably go through the calculations to make them more robust. |
Conflicts: extras/assets/icons/Icons_Modules.psd
… obstruct view, Fix high throw arc being way off, Fix script error on intersect with object
* better banana throwing * Handle detaching from ace_attach
When in drop mode, you're able to "extend" the grenade distance through a closed window (through the glass). |
Yes, that is a limitation of the engine. There is no proper way to detect glass. You can see with vanilla grenades, you can throw them through those glass windows perfectly fine. |
…inventory check above throw power calculations
|
||
// Inventory check | ||
if (_throwable isEqualTo [] && {!_primed}) exitWith { | ||
[ACE_player, "No valid throwables"] call FUNC(exitThrowMode); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"No valid throwables" -> Stringtable? (or is this just log?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's just for debugging, won't ever be shown to user.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, just log.
🎉 |
What do I do, if I want to set button to cancel Advanced Throwing? Where can I do it? |
@BlackburnUTG you can't rebind the cancel button. And please don't revive merged pull requests, join our Slack for questions. |
When merged this pull request will:
Todo:
CBA_fnc_addDisplayHandler
postInitfired
eventwaitUntilAndExecute
s andwaitAndExecute
s where possible (FUNC(throw)
needs serious work on that)player
->ACE_player
/passed_unit
Use grenade throw key (requires intercepting that key so it doesn't do its default action)- Use custom CBA key instead of "Cycle Throw Items" instead.design decision to leave it like that, simpler for end-user to understand and not make mistakes because of it (can't change direction of player in FFV slot, raising weapon changes look direction to where weapon is pointing)DefaultAction
doesn't get executed when in FFV with lowered weapon, so throw requires 2 LMB presses to actually throwfixed by changing it to "toggle drop mode" instead of holding a buttonKeyUp
isn't guaranteed to fire (for some reason) - for example holding it down for short amount of time - apparently vanilla issueDefaultAction
doesn't fire whendriver vehicle == unit
- fixed by changing tomouseButtonDown
event and leavingDefaultAction
for "fire" suppression onlyweaponselect
change throwable keys compatible with from inside vehicle throwing.Replace animation with gesture to properly fix the moving mistakes (current fix makes grenade be thrown from behind you if you walk or run)no suitable gesture, current fix will have to doGVAR
s tosetVariable
sFuture:
-> #4218
Experimentation:
Rolling throwablesArma 3 physics allow you to throw into the floor and it will be almost the exact same effect as ACE2 grenade rolling, not much point implementingCustom pin sound instead of regular throw sound->ace_grenades
separate component if everTo decide:
Remove grenade modes fromLeave for anyone who wants to use itace_grenades
?Make Advanced Throwing mandatory or keep it optional (default enabled)? (connects with above, if we keep it it might be nice to keep old modes as well? if removed rename toLeaving optionalace_throwing
?)Add support for picking up primed throwables to vanilla throwing? (if yes, move toNo, due to no nice way of holding them, apart from delay from pick up to throwace_grenades
?)